import service from "./indexApi";
const roomApi={
    //退房
    updateUserAndRoomState(rnumber){
        return service.put(`/admin/room/${rnumber}`)
    },
    //修改
    update(room){
        return service.put('/admin/room',room)
    },
    //删除
    delectByRnumber(rnumber){
        return service.delete(`/admin/room/${rnumber}`);
    },
    //根据房号查询
    selectByRnumber(rnumber){
        return service.get(`/admin/room/${rnumber}`)
    },
    //查询所有
    selectAll(pageNum,rnumber,rstate){
        return service.get('/admin/room',{
            params: {
                pageNum,
                rnumber,
                rstate
            }
        });
    },
    //查询房间下所有的用户
    selectUsersByRid(rid){
        return service.get(`/admin/room/alluid/${rid}`)
    },
   
    
}
export default roomApi;